Skip to content

Added libraries .development flag detection #1962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 4, 2022

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Nov 3, 2022

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

Adds the reporting of a library "in-development" status in the gRPC and JSON output.
The "in-development" status is determined by the presence of a .development file in the library's root directory.

What is the current behavior?

the library "in_development" status is not reported:

$ touch /home/megabug/Arduino/libraries/Robot_Motor/.development
$ arduino-cli lib list "Robot Motor" --format json
[
  {
    "library": {
      "name": "Robot Motor",
      "author": "Arduino",
      "maintainer": "Arduino \[email protected]\u003e",
      "sentence": "Enables easy access to the motors of the Arduino Robot Motor board. For Arduino Robot only.",
      "website": "http://www.arduino.cc/en/Reference/RobotLibrary",
      "category": "Device Control",
      "architectures": [
        "avr"
      ],
      "install_dir": "/home/megabug/Arduino/libraries/Robot_Motor",
      "source_dir": "/home/megabug/Arduino/libraries/Robot_Motor/src",
      "version": "1.0.3",
      "license": "Unspecified",
      "location": 1,
      "layout": 1,
      "examples": [
        "/home/megabug/Arduino/libraries/Robot_Motor/examples/Robot_IR_Array_Test",
        "/home/megabug/Arduino/libraries/Robot_Motor/examples/Robot_Motor_Core"
      ],
      "provides_includes": [
        "ArduinoRobotMotorBoard.h",
        "EasyTransfer2.h",
        "LineFollow.h",
        "Multiplexer.h"
      ]
    }
  }
]

What is the new behavior?

The library's "in-development" status is reported:

$ touch /home/megabug/Arduino/libraries/Robot_Motor/.development
$ arduino-cli lib list "Robot Motor" --format json
[
  {
    "library": {
      "name": "Robot Motor",
      "author": "Arduino",
      "maintainer": "Arduino \[email protected]\u003e",
      "sentence": "Enables easy access to the motors of the Arduino Robot Motor board. For Arduino Robot only.",
      "website": "http://www.arduino.cc/en/Reference/RobotLibrary",
      "category": "Device Control",
      "architectures": [
        "avr"
      ],
      "install_dir": "/home/megabug/Arduino/libraries/Robot_Motor",
      "source_dir": "/home/megabug/Arduino/libraries/Robot_Motor/src",
      "version": "1.0.3",
      "license": "Unspecified",
      "location": 1,
      "layout": 1,
      "examples": [
        "/home/megabug/Arduino/libraries/Robot_Motor/examples/Robot_IR_Array_Test",
        "/home/megabug/Arduino/libraries/Robot_Motor/examples/Robot_Motor_Core"
      ],
      "provides_includes": [
        "ArduinoRobotMotorBoard.h",
        "EasyTransfer2.h",
        "LineFollow.h",
        "Multiplexer.h"
      ],
      "in_development": true                  <------------
    }
  }
]

Does this PR introduce a breaking change, and is titled accordingly?

No

@cmaglie cmaglie linked an issue Nov 3, 2022 that may be closed by this pull request
3 tasks
@cmaglie cmaglie self-assigned this Nov 3, 2022
@cmaglie cmaglie requested review from per1234 and umbynos November 3, 2022 17:15
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Nov 4, 2022
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Cristian!

@cmaglie cmaglie merged commit ec3e71c into arduino:master Nov 4, 2022
@cmaglie cmaglie deleted the library_dev_flag branch November 4, 2022 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indicate presence of development flag file in library data
2 participants